package com.gz.consumer.zookeeper.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;

@RestController
@RequestMapping("/api/zk/")
public class Test {

    @Autowired
    private RestTemplate template;

    @GetMapping("/test")
    public ResponseEntity<HashMap> test(){
        return template.getForEntity("http://cloud-provider-payment/pay/api/zk/test",HashMap.class);
    }
}
